package com.h3c.nem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.h3c.nem.entity.TbCareNoticeLog;
import com.h3c.nem.mapper.TbCareNoticeLogMapper;
import com.h3c.nem.service.ITbCareNoticeLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 新员工关怀通知日志
 *
 * @author z22968
 * @date 2022/6/20 15:40
 */
@Slf4j
@Service
public class TbCareNoticeLogServiceImpl extends ServiceImpl<TbCareNoticeLogMapper, TbCareNoticeLog> implements ITbCareNoticeLogService {

    @Override
    public void addCareNoticeLog(String workerId, Boolean status, String exception, String type) {
        TbCareNoticeLog careNoticeLog = new TbCareNoticeLog();
        careNoticeLog.setWorkerId(workerId);
        careNoticeLog.setType(type);
        careNoticeLog.setStatus(status);
        careNoticeLog.setException(exception);
        this.save(careNoticeLog);
    }
}
